home *** CD-ROM | disk | FTP | other *** search
/ BCI NET 2 / BCI NET 2.iso / archives / networking / misc / parpc04.lha / hardware / docs / parallel.doc < prev    next >
Encoding:
Text File  |  1993-08-31  |  3.8 KB  |  115 lines

  1. #9          24-MAY-1993 10:38:23.57                                     MAIL
  2. From:    IN%"rme@bdk.tue.nl"
  3. To:    IN%"spe@bdk.tue.nl"
  4. CC:    
  5. Subj:    PARALLEL PORT INFO (that everybody has been waiting for?)
  6.  
  7. --- Forwarded message follows ---
  8. From: angel@Foghorn_Leghorn.coe.northeastern.edu (Angel at large)
  9. Subject: PARALLEL PORT INFO (that everybody has been waiting for?)
  10. Date: Sat, 22 May 1993 20:54:27 GMT
  11. There was a lot of interest in the technical aspects of parallel port 
  12. interface, so I decide to port this.  Please, no flames, but corrections are 
  13. welcome.  I will keep this file, because this is the second time people asked
  14. for this info (maybe I'll become alt.parallel-port.interface-faq :), and I'l
  15. include any corrections or additions...  If you know any other newsgroups it
  16. should be posted to, let me know...
  17.  
  18.  
  19. ---- snip? -----
  20. ============================================================================
  21. Hardware specifications:
  22.     This is what each pin on the parallel DB25 port does
  23.     source: ComputerCraft Magazine
  24.  
  25. PIN    TYPE    FUNCTION
  26. 1    IO    -Strobe
  27. 2    IO    Data bit 0
  28. 3    IO    Bata bit 1
  29. 4    IO    Data bit 2
  30. 5    IO    Data bit 3
  31. 6    IO    Data bit 4
  32. 7    IO    Data bit 5
  33. 8    IO    Data bit 6
  34. 7    IO    Data bit 7
  35. 10    I    -Acknowledge
  36. 11    I    Busy
  37. 12    I    Paper end/empty
  38. 13    I    Select
  39. 14    O    -Auto Feed
  40. 15    O    -Error/Oscillator
  41. 16    O    -Initialize printer
  42. 17    O    -Select Input
  43. 18-25    GND    Ground
  44.  
  45.     This is what you can/need to pull from the pins:
  46.  
  47. 1. To SWITCH from logical 1 to logical 0 on a BI-DIRECTIONAL parallel
  48. port you need to pull 20-40mA
  49. 2. The Maximum safe limit of current you can pull off
  50. NON-bi-directional port is 2.6mA, but it can sink 24mA
  51.  
  52. Source: Assembled from ComputerCraft Magazine
  53.  
  54. Explanations:
  55. There are two types of parallel ports: bidirectional and
  56. unidirectional.  In a bidirectional port you can use some pins for
  57. input (like data pins) if you write 1s to them and then pull them low.
  58. On a non-bidirectional port, you can destroy it that way.
  59.  
  60. =========================================================================
  61. Software information:
  62. IO port location:
  63.     Parallel 1:
  64.         Data port    278h
  65.         Status port    279h
  66.         Control port    27Ah
  67.     Parallel 2:
  68.         Data port    378h
  69.         Status port    379h
  70.         Control port    37Ah
  71.     Parallel 3:
  72.         Data port    3BCh
  73.         Status port    3BDh
  74.         Control port    3BEh
  75.  
  76. IO port functions:
  77.     Data port
  78.         this port controls the data pins directly.  Can also
  79.         be read if you write FFh to it and then pull it low 
  80.         externally IF YOU HAVE A BIDIRECTIONAL PORT.
  81.     Status Port:
  82.         Bit 7 = 0    Busy
  83.         Bit 6 = 0    Acknowledge
  84.         Bit 5 = 1    Out or paper
  85.         Bit 4 = 1    Printer is selected
  86.         Bit 3 = 0    Error
  87.         Bit 2 = 0    IRQ has occured
  88.         Bit 1-2        Reserved
  89.     Control Port:
  90.         Bit 4 = 1    Enable IRQ
  91.         Bit 3 = 1    Select Printer
  92.         Bit 2 = 0    Initialize printer
  93.         Bit 1 = 1    Automatic line feed
  94.         Bit 0 = 1    Strobe
  95.  
  96. -source: Phoenix System BIOS for IBM PC/XT/AT computers and compatibles, First 
  97. edition.
  98.  
  99. I don't know how all of this pins do to a PRINTER, but they do effect the 
  100. voltage levels on the parallel port.  There might be transcription mistakes,
  101. but nothing that a little experimentation with a voltmeter can't fix.  In fact
  102. I would reccomend to rely on this text as a general guidline and figure 
  103. everything else out through experimentation.  For myself, I've written a small
  104. ASM program that constantly shows me what the values of all ports are, while 
  105. I play with the pins and/or write to the port from another DesqView session.
  106. Have fun!
  107.  
  108.  
  109.  
  110.         *             Angel@foghorn_leghorn.coe.northeastern.edu
  111.    *   * *     *   BTW: These are my opinions, and not that of any other entity
  112. - * * *   *   * * ------------------------------------------------------------*
  113.      *     * *               My god, its full of stars! - Dave
  114.             *        I don't know about you, but we've got company!  - Epidemic
  115.